/*
	Change [prefix] to prefix you have in your main plugin!

*/
#include "td_def.inc"


/*	Registeres dealer with specified id
	@params:
		id - 		dealers id
		name - 		Dealers name
		refreshItems - 	should items be refreshed on round start
			Dra_Never - do not refresh
			Dra_OnLost - refresh if dealer has refreshItemsCount items or less
			Dra_Always - always refresh items
		refreshItemsCount - noumber of items when refresh will be called
		refreshDropOld - should dealer loose old items when refreshing
	
	@return:
		- id of dealer 
		- NO_DEALER if no mre dealers are allowed
		- NO_DEALER if dealer with this id was already registered
*/
native [prefix]_register_dealer_by_id(id, const name[], DealerRefreshAction:refreshItems=Dealer_RefreshOnLost, refreshItemsCount=0,bool:refreshDropOld=false);

/*	Registeres dealer
	@params:
		name - 		Dealers name
		refreshItems - 	should items be refreshed on round start
			Dra_Never - do not refresh
			Dra_OnLost - refresh if dealer has refreshItemsCount items or less
			Dra_Always - always refresh items
		refreshItemsCount - noumber of items when refresh will be called
		refreshDropOld - should dealer loose old items when refreshing
	
	@return:
		id of dealer or NO_DEALER if no mre dealers are allowed
*/
native [prefix]_register_dealer(const name[], DealerRefreshAction:refreshItems=Dealer_RefreshOnLost, refreshItemsCount=0,bool:refreshDropOld=false);

/* 	Sets dealers item definition
	@params:
		dealer -	dealers id
		item - 		item
		minCount - 	minimum count of items
		maxCount - 	maximum count of items
		minChance - 	minimum chance dealer will have this item
		maxChance - 	maximum chance dealer will have this item
		minCost - 	minimum cost of item
		maxCost	- 	maximum cost of item
*/
native [prefix]_set_dealer_item_def(dealer, item, minCount, maxCount, minChance, maxChance, minCost, maxCost);

/*	Gets dealers count
*/
native [prefix]_get_dealers_count();

/* 	Gets items count
*/
native [prefix]_get_items_count();

/* 	Gives items to dealers
	@params:
		forceGive - 	if true items will be given always, else items will be given if
				dealer was registered with refreshItems = 2 or
				refreshItems = 1 and dealer has refreshItemsCount items or less
		forceClean - 	if true and items will be given - forces clearing items
			
*/		
native [prefix]_give_items_to_dealers( bool:forceGive = false, bool:forceClean=false);

/* 	Gives items to dealer
	@params:
		dealer - 	dealers id
		forceGive - 	if true items will be given always, else items will be given if
				dealer was registered with refreshItems = 2 or
				refreshItems = 1 and dealer has refreshItemsCount items or less
		forceClean - 	if true and items will be given - forces clearing items
			
*/		
native [prefix]_give_items_to_dealer(dealer, bool:forceGive = false, bool:forceClean=false);

/* 	Sets dealers item count and cost. This can be changed if dealers items be refreshed
	@params:
		dealer - 	dealers id
		item - 		item
		bAdd - 		if true - dealers item count will be increased, else it will be set to count value
		count - 	noumber of items
		cost - 		cost of items
*/
native [prefix]_give_item_to_dealer(dealer, item, bool:bAdd, count, cost);

/* 	Clears players dealers. After calling this method player will have no access to any dealer
	@params:
		id - 		players id
*/
native [prefix]_clear_player_dealers(id);

/* 	Will grant access, for player, to specified dealers
	@params:
		id - 		id of player
		dealers - 	all dealers that player should have access to
		count - 	noumber of dealers
		clearOthers - 	if true player will loose access to other dealers
*/
native [prefix]_set_player_dealers(id, const dealers[], count, bool: clearOthers=true);

/* 	Sets or removes acces to dealer
	@params:
		id -		players id
		dealer - 	dealers id
		set - 		true/fals - give/remove access
*/
native [prefix]_set_player_dealer(id, dealer, bool:set);

/* 	Clears players dealers. After calling this method player will have no access to any items
	@params:
		id - 		players id
*/
native [prefix]_clear_player_items(id);

/* 	Will grant access, for player, to specified items
	@params:
		id - 		id of player
		items - 	all items that player should have access to
		count - 	noumber of items
		clearOthers - 	if true player will loose access to other items
*/
native [prefix]_set_player_items(id, const items[], count, bool: clearOthers=true);

/* 	Sets or removes acces to dealer
	@params:
		id -		players id
		item - 		item
		set - 		true/fals - give/remove access
*/
native [prefix]_set_player_item(id, drug, bool:set);

/*	Shows dealer menu

*/
native [prefix]_dealer_menu(id);

/*	Shows item menu

*/
native [prefix]_item_menu(id);


